package com.cxy.factory;

import com.cxy.phone.HuaweiPhone;
import com.cxy.phone.Phone;
import com.cxy.phone.XiaomiPhone;

public class SimpleFactory {
    public static Phone producePhone(String phone) {
        switch (phone) {
            case "Huawei":
                return new HuaweiPhone();
            case "Xiaomi":
                return new XiaomiPhone();
            default:
                return null;
        }
    }
}
